<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>欢迎回家，尊敬的管理员大人~</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
    <style>
        .navbar-container {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            height: 50px;
            background-color: #393D49;
        }

        .navbar-container ul {
            display: flex;
            flex-grow: 1;
            justify-content: flex-end;
            list-style: none;
            padding: 0;
            margin: 0;
            background-color: #393D49;
        }

        .navbar-container li {
            margin-right: 10px;
        }

        .navbar-container li:last-child {
            margin-right: 0;
        }

        .navbar-container a {
            color: #333;
            text-decoration: none;
            padding: 5px 10px;
        }

        .logo {
            background-color: #393D49;
        }

        .logo img {
            width: 200px;
            height: auto;
        }

        .sidebar-container {
            background-color: #393D49;
            color: #fff;
            width: 200px;
            height: 100vh;
            position: fixed;
            left: 0;
            top: 50px;
        }

        .sidebar-container ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .sidebar-container li {
            margin-bottom: 10px;
        }

        .sidebar-container a {
            display: block;
            padding: 10px;
            color: #fff;
            text-decoration: none;
        }

        .page-content {
            margin-left: 100px;
            padding: 20px;
            height: calc(100vh - 50px);
            overflow: hidden;
        }

        #contentContainer iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        body {
            overflow: hidden;
        }
    </style>
</head>
<body>
<div class="header">
    <div class="navbar-container">
        <div class="logo">
            <img src="../layui/img/logo.png" alt="Logo">
        </div>
        <ul class="layui-nav">
            <li class="layui-nav-item layui-this"><a href="">首页</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;" onclick="loadUserList()">会员列表</a>
            </li>
            <li class="layui-nav-item"><a href="">资金明细</a></li>
            <li class="layui-nav-item"><a href="">积分体系</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">我的账户</a>
                <dl class="layui-nav-child">
                    <dd><a href="/kamun/admin/info">账户信息</a></dd>
                    <dd><a href=""></a></dd>
                    <dd><a href="/kamun/admin/logout">注销</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>
<div class="sidebar-container">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo">
        <li class="layui-nav-item layui-nav-itemed">
            <a href="javascript:;">会员管理</a>
            <dl class="layui-nav-child">
                <dd><a href="javascript:;" onclick="loadUserList()">会员列表</a></dd>
                <dd><a href="javascript:;">会员审核</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item"><a href="javascript:;">商品管理</a></li>
        <li class="layui-nav-item"><a href="">分类管理</a></li>
        <li class="layui-nav-item"><a href="">订单管理</a></li>
        <li class="layui-nav-item"><a href="">积分管理</a></li>
    </ul>
</div>

<div class="page-content" id="contentContainer">
    <!-- 初始页面内容 -->
</div>



<script>
    function loadUserList() {
        console.log("点击了会员列表按钮");

        // 创建一个iframe元素
        var iframe = document.createElement('iframe');
        iframe.src = '/kamun/admin/users';
        iframe.style.width = '100%';
        iframe.style.height = '100%';
        iframe.style.border = 'none';

        // 清空容器内容
        var container = document.getElementById('contentContainer');
        container.innerHTML = '';

        // 将iframe添加到容器中
        container.appendChild(iframe);
    }

</script>

</body>
</html>
